Prevent event listener socket from being inherited by children.
authorjbulpin@wicket.uk.xensource.com <jbulpin@wicket.uk.xensource.com>
Sat, 29 Oct 2005 00:58:00 +0000 (01:58 +0100)
committerjbulpin@wicket.uk.xensource.com <jbulpin@wicket.uk.xensource.com>
Sat, 29 Oct 2005 00:58:00 +0000 (01:58 +0100)
This was passing down to dhclient which was keeping the 8001 port
open and preventing xend restarting.

Also fixed a case typo in setCloExec

Signed-off-by: James Bulpin <james@xensource.com>
tools/python/xen/web/tcp.py
tools/python/xen/xend/server/event.py

index b9dddd15261282fa56fbadcff78cde07570fd7e2..743fd6daf337155a6c4ba8b63ce59168fa241397 100644 (file)
@@ -99,7 +99,7 @@ def listenTCP(port, factory, interface='', backlog=None):
     return l
 
 def SetCloExec(SocketListener):
-    SocketListener.SetCloExec()
+    SocketListener.setCloExec()
 
 def connectTCP(host, port, factory, timeout=None, bindAddress=None):
     c = TCPConnector(host, port, factory, timeout=timeout, bindAddress=bindAddress)
index bf0521c7645ba94a1e696b684f2131208d8ad90f..ab03c2cb6a5170df18cf32533311f4711b72aef2 100644 (file)
@@ -192,4 +192,5 @@ def listenEvent(daemon):
     if xroot.get_xend_http_server():
         port = xroot.get_xend_event_port()
         interface = xroot.get_xend_address()
-        tcp.listenTCP(port, factory, interface=interface)
+        l = tcp.listenTCP(port, factory, interface=interface)
+        l.setCloExec()